package him.action.factory;





import him.action.Action;
import him.action.ActionFactory;
import him.action.board.AdminDeleteBoardAction;
import him.action.board.AuthUpdateAction;
import him.action.board.BoardListAction;
import him.action.board.DeleteBoardAction;
import him.action.board.DetailBoardAction;
import him.action.board.EduDeleteAction;
import him.action.board.EduDetailAction;
import him.action.board.EduInsertAction;
import him.action.board.EduInsertbfAction;
import him.action.board.EduListAction;
import him.action.board.EduUpdateAction;
import him.action.board.EduUpdatebfAction;
import him.action.board.NoticeDeleteAction;
import him.action.board.NoticeDetailAction;
import him.action.board.NoticeInsertAction;
import him.action.board.NoticeInsertBfAction;
import him.action.board.NoticeListAction;
import him.action.board.NoticeUpdateAction;
import him.action.board.NoticeUpdateBfAction;
import him.action.board.ReplyBoardAction;
import him.action.board.SimpleAction;
import him.action.board.UpdateBoardAction;
import him.action.board.UserListAction;
import him.action.board.WriteBoardAction;

public class BoardActionFactory implements ActionFactory {
	private static BoardActionFactory factory;
	
	public static BoardActionFactory getInstance(){
		if (factory==null) {
			factory=new BoardActionFactory();
		}
		return factory;
	}
	@Override
	public Action getAction(String command) {
		Action action = null;
		if (command.equalsIgnoreCase("noticedetail")) {
			action = new NoticeDetailAction();
		}else if (command.equalsIgnoreCase("noticelist")) {
			action = new NoticeListAction();
		}else if (command.equalsIgnoreCase("noticeinsert")) {
			action = new NoticeInsertAction();
		}else if (command.equalsIgnoreCase("noticeupdate")) {
			action = new NoticeUpdateAction();
		}else if (command.equalsIgnoreCase("noticeinsertbf")) {
			action = new NoticeInsertBfAction();
		}else if (command.equalsIgnoreCase("noticeupdatebf")) {
			action = new NoticeUpdateBfAction();
		}else if (command.equalsIgnoreCase("noticedelete")) {
			action = new NoticeDeleteAction();
		}else if (command.equalsIgnoreCase("edudetail")) {
			action = new EduDetailAction();
		}else if (command.equalsIgnoreCase("eduinsert")) {
			action = new EduInsertAction();
		}else if (command.equalsIgnoreCase("eduinsertbf")) {
			action = new EduInsertbfAction();
		}else if (command.equalsIgnoreCase("eduupdatebf")) {
			action = new EduUpdatebfAction();
		}else if (command.equalsIgnoreCase("eduupdate")) {
			action = new EduUpdateAction();
		}else if (command.equalsIgnoreCase("edudelete")) {
			action = new EduDeleteAction();
		}else if (command.equalsIgnoreCase("edulist")) {
			action = new EduListAction();
		}else if(command.equalsIgnoreCase("list")){
			action=new BoardListAction();//loginafter
		}else if(command.equalsIgnoreCase("calendar")){
			action=new SimpleAction();
		}else if(command.equalsIgnoreCase("writeform")){
			action=new SimpleAction();
		}else if(command.equalsIgnoreCase("detail")){
			action=new DetailBoardAction();
		}else if(command.equalsIgnoreCase("write")){
			action=new WriteBoardAction();
		}else if(command.equalsIgnoreCase("bfupdate")){
			action=new UpdateBoardAction();
		}else if(command.equalsIgnoreCase("update")){
			action=new UpdateBoardAction();
		}else if(command.equalsIgnoreCase("bfreply")){
			action=new ReplyBoardAction();
		}else if(command.equalsIgnoreCase("reply")){
			action=new ReplyBoardAction();
		}else if(command.equalsIgnoreCase("delete")){
			action=new DeleteBoardAction();
		}else if(command.equalsIgnoreCase("adminlist")){
			action=new UserListAction();
		}else if(command.equalsIgnoreCase("adminauth")){
			action=new AuthUpdateAction();
		}else if(command.equalsIgnoreCase("authupdate")){
			action=new AuthUpdateAction();
		}else if(command.equalsIgnoreCase("admindeletelist")){
			action=new AdminDeleteBoardAction();
		}else if(command.equalsIgnoreCase("realdel")){
			action=new AdminDeleteBoardAction();
		}
		return action;
	}

}
